<template>
  <div id="app">
    <div class="header">
      <router-link to="/showBlogs">博客</router-link>
      <router-link to="/addBlog">写博客</router-link>
    </div>
    <router-view></router-view>
  </div>
</template>

<script>
// import AddBlog from './components/AddBlog'

export default {
  name: 'App',
  components: {
    // AddBlog
  }
}
</script>

<style>
.header{
  width: 840px;
  height: 50px;
  background-color: crimson;
  margin:10px auto;
  display: flex;
  justify-content: center;
  align-items: center;
}
.header>a{
  color: #fff;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  font-size: 18px;
}
.header>a:first-of-type{
  margin-right: 10px;
}
.header>a.router-link-active{
  color: black;
  background-color: rgba(255, 255, 255, 0.3);
  padding:5px;
}
</style>
